<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>fixed</title>
    <style>
        body{
            margin: 0;
            padding: 0;
        }
        .main1{
            top:0;
            bottom: 0;
            width:100%;
            height:100%;
            position: fixed;
            background-color:rgba(0,0,0,0.5);
        }
        .box{
            border: 1px solid black;
            width: 400px;
            height: 300px;
            position: fixed;
            top:0;
            bottom: 0;
         margin-left:500px;
            margin-top: 400px;
            background-color: #FFFFFF;
            text-align: center;

        }
        .main2{
            background-color: blue;
        }

    </style>
</head>
<body>
        <div class="main">糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br />糯米<br /></div>
        <div class="main1"></div>
            <div class="box">
            <div class="main2">这里是内容</div>
            <div class="main3">这里是内容</div>
            <div class="main4">这里是内容</div>
            <div class="main5">这里是内容</div>
            <div class="main6">这里是内容</div>
            </div>

</body>
</html>